function PatterAction(selector) {
	this.ele = $(selector).get(0);
	this.patter1();
	this.patter2();
}
PatterAction.prototype.patter1 = function() {
	var oSelf = this;
	$(oSelf.ele).find('.no1 .phonenumber').on({
		focusout: function() {
			var patter = /^1[34578]\d{9}$/;
			if(patter.test($(oSelf.ele).find('.no1 .phonenumber').val())) {
				console.log('合法');
			} else {
				alert('手机号不合法');
			}
		}
	});
}
PatterAction.prototype.patter2 = function() {
	var oSelf = this;
	$(oSelf.ele).find('.password').on({
		focusout: function() {
			var reg1 = /[!@#$%^&*()_?<>{}]{1}/;
			var reg2 = /([a-zA-Z0-9!@#$%^&*()_?<>{}]){8,18}/;
			var reg3 = /[a-zA-Z]+/;
			var reg4 = /[0-9]+/;
			if(reg1.test($(oSelf.ele).find('.password').val()) && reg2.test($(oSelf.ele).find('.password').val()) && reg3.test($(oSelf.ele).find('.password').val()) && reg4.test($(oSelf.ele).find('.password').val())) {
				return true;
			} else if(!reg1.test($(oSelf.ele).find('.password').val())) {
				alert("需包含一个特殊字符");
				return false;
			} else if(!reg2.test($(oSelf.ele).find('.password').val())) {
				alert("长度在8-18位");
				return false;
			} else if(!reg3.test($(oSelf.ele).find('.password').val())) {
				alert("需含有字母");
				return false;
			} else if(!reg4.test($(oSelf.ele).find('.password').val())) {
				alert("需含有数字");
				return false;
			}
		}
	})
}
PatterAction.prototype.passwordeven = function() {
	var oSelf = this;
	$(oSelf.ele).find('.passwordprov').on({
			focusout: function() {
				var password1 = $(oSelf.ele).find('.password').val();
				var password2 = $(oSelf.ele).find('.passwordprov').val();
				if(password1 != password2) {
					alert('输入密码需要一致');
				} else {
					console.log('密码验证成功');
				}	
			}	
	})
}